﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace yoyosoft.BookList.Migrations
{
    public partial class addtable : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_booktag",
                table: "booktag");

            migrationBuilder.DropPrimaryKey(
                name: "PK_book",
                table: "book");

            migrationBuilder.DropPrimaryKey(
                name: "PK_bookLists",
                table: "bookLists");

            migrationBuilder.RenameTable(
                name: "booktag",
                newName: "BookTag");

            migrationBuilder.RenameTable(
                name: "book",
                newName: "Book");

            migrationBuilder.RenameTable(
                name: "bookLists",
                newName: "CloudBooklist");

            migrationBuilder.AddPrimaryKey(
                name: "PK_BookTag",
                table: "BookTag",
                column: "Id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_Book",
                table: "Book",
                column: "Id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_CloudBooklist",
                table: "CloudBooklist",
                column: "Id");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_BookTag",
                table: "BookTag");

            migrationBuilder.DropPrimaryKey(
                name: "PK_Book",
                table: "Book");

            migrationBuilder.DropPrimaryKey(
                name: "PK_CloudBooklist",
                table: "CloudBooklist");

            migrationBuilder.RenameTable(
                name: "BookTag",
                newName: "booktag");

            migrationBuilder.RenameTable(
                name: "Book",
                newName: "book");

            migrationBuilder.RenameTable(
                name: "CloudBooklist",
                newName: "bookLists");

            migrationBuilder.AddPrimaryKey(
                name: "PK_booktag",
                table: "booktag",
                column: "Id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_book",
                table: "book",
                column: "Id");

            migrationBuilder.AddPrimaryKey(
                name: "PK_bookLists",
                table: "bookLists",
                column: "Id");
        }
    }
}
